/**
 * 
 */
package edu.uwm.nlp.jude.internal;

import java.util.ArrayList;

/**
 * @author qing
 *
 * Jun 15, 2009
 */
public class ReferenceEntity {
	
	private String idInRef;
	private String fullRef;
	private String pmid;
	private String pmcid;
	private ArrayList<String> contextList = new ArrayList<String>();
	
	
	
	public ArrayList<String> getContextList() {
		return contextList;
	}

	public void setContextList(ArrayList<String> contextList) {
		this.contextList = contextList;
	}

	public ReferenceEntity(String idInRef, String fullRef)
	{
		this.idInRef = idInRef;
		this.fullRef = fullRef;
	}
	
	public ReferenceEntity()
	{
		
	}
	
	public String getIdInRef() {
		return idInRef;
	}
	public void setIdInRef(String idInRef) {
		this.idInRef = idInRef;
	}
	public String getFullRef() {
		return fullRef;
	}
	public void setFullRef(String fullRef) {
		this.fullRef = fullRef;
	}
	
	public String getPmid() {
		return pmid;
	}
	public void setPmid(String pmid) {
		this.pmid = pmid;
	}
	public String getPmcid() {
		return pmcid;
	}
	public void setPmcid(String pmcid) {
		this.pmcid = pmcid;
	}
	
	public String toString()
	{
		String str = new String();
		String contexts = new String();
		int i = 1;
		for(String ctx: contextList)
		{
			contexts+="\n\t-- "+i+" th --->>"+ctx;
			i++;
		}
		str += "\n\n#######\n\n"+idInRef+"=="+fullRef+"\n\n"+
				"--CONTEXTS--->"+contexts+"\n\npmid="+pmid;
		return str;
	}
	
	public String getContextListStr()
	{
		if(contextList==null)return "";
		StringBuffer sb = new StringBuffer();
		for(String ctx: contextList)
		{
			sb.append("&nbsp&nbsp&nbsp&nbsp"+ctx+"<br><br>");
		}
		return sb.toString();
	}
	

}
